package com.cheng.example.geektime.designpatterns.j57.eventbus;

import com.google.common.eventbus.Subscribe;


/**
 * 通知观察者
 */
public class RegNotificationObserver {

    private RegNotificationService regNotificationService = new RegNotificationService();

    @Subscribe//订阅的意思
    public void handleRegSuccess(Long userId) {
        regNotificationService.sendInboxMessage(userId, "Welcome...");
    }
}
